+Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
+ Call _gdk_draw_pixbuf(), thus enabling using this function
+ for pixbufs with alpha. (#68801)
+
+ * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
+ implementation of gdk_pixbuf_render_to_drawable()
+ to here.
+
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
+Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
+ Call _gdk_draw_pixbuf(), thus enabling using this function
+ for pixbufs with alpha. (#68801)
+
+ * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
+ implementation of gdk_pixbuf_render_to_drawable()
+ to here.
+
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
+Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
+ Call _gdk_draw_pixbuf(), thus enabling using this function
+ for pixbufs with alpha. (#68801)
+
+ * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
+ implementation of gdk_pixbuf_render_to_drawable()
+ to here.
+
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
+Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
+ Call _gdk_draw_pixbuf(), thus enabling using this function
+ for pixbufs with alpha. (#68801)
+
+ * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
+ implementation of gdk_pixbuf_render_to_drawable()
+ to here.
+
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
+Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
+ Call _gdk_draw_pixbuf(), thus enabling using this function
+ for pixbufs with alpha. (#68801)
+
+ * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
+ implementation of gdk_pixbuf_render_to_drawable()
+ to here.
+
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
+Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
+ Call _gdk_draw_pixbuf(), thus enabling using this function
+ for pixbufs with alpha. (#68801)
+
+ * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
+ implementation of gdk_pixbuf_render_to_drawable()
+ to here.
+
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
+Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
+ Call _gdk_draw_pixbuf(), thus enabling using this function
+ for pixbufs with alpha. (#68801)
+
+ * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
+ implementation of gdk_pixbuf_render_to_drawable()
+ to here.
+
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
if (composited)
{
- gdk_pixbuf_render_to_drawable (composited,
- drawable, gc,
- 0, 0,
- dest_x, dest_y,
- width, height,
- dither,
- x_dither, y_dither);
+ src_x = 0;
+ src_y = 0;
+ pixbuf = composited;
}
- else
+
+ if (pixbuf->n_channels == 4)
+ {
+ guchar *buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 4;
+
+ gdk_draw_rgb_32_image_dithalign (drawable, gc,
+ dest_x, dest_y,
+ width, height,
+ dither,
+ buf, pixbuf->rowstride,
+ x_dither, y_dither);
+ }
+ else /* n_channels == 3 */
{
- gdk_pixbuf_render_to_drawable (pixbuf,
- drawable, gc,
- src_x, src_y,
- dest_x, dest_y,
- width, height,
- dither,
- x_dither, y_dither);
+ guchar *buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
+
+ gdk_draw_rgb_image_dithalign (drawable, gc,
+ dest_x, dest_y,
+ width, height,
+ dither,
+ buf, pixbuf->rowstride,
+ x_dither, y_dither);
}
out:
GdkRgbDither dither,
int x_dither, int y_dither)
{
- int rowstride;
- guchar *buf;
-
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
g_return_if_fail (pixbuf->bits_per_sample == 8);
g_return_if_fail (drawable != NULL);
- g_return_if_fail (gc != NULL);
if (width == -1)
width = pixbuf->width;
if (width == 0 || height == 0)
return;
- /* This will have to be modified once we support other image types.
- */
-
- if (pixbuf->n_channels == 4)
- {
- buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 4;
- rowstride = pixbuf->rowstride;
-
- gdk_draw_rgb_32_image_dithalign (drawable, gc,
- dest_x, dest_y,
- width, height,
- dither,
- buf, rowstride,
- x_dither, y_dither);
- }
- else /* n_channels == 3 */
- {
- buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
- rowstride = pixbuf->rowstride;
-
- gdk_draw_rgb_image_dithalign (drawable, gc,
- dest_x, dest_y,
- width, height,
- dither,
- buf, rowstride,
- x_dither, y_dither);
- }
+ _gdk_draw_pixbuf (drawable, gc, pixbuf,
+ src_x, src_y, dest_x, dest_y, width, height,
+ dither, x_dither, y_dither);
}
\f